Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librustc: Replace scope regions with SEME regions. #16996

Closed
wants to merge 1 commit into from

Conversation

pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Sep 4, 2014

SEME is short for "single-entry/multiple-exit".

This patch contains no functional changes, because all intersection and
union operations on SEME regions convert SEME regions to scopes and use
the old scope-based intersection/union logic on those scopes. However,
this patch does take the full generality of SEME regions into account
when computing the gen/kill bits for the data flow analysis used in the
borrow check. Once the correct intersection and union operations land
(possibly using the dominator tree infrastructure), then non-lexical
borrows (issue #6393) will begin to work. Therefore, this patch
establishes most of the groundwork for non-lexical borrows.

Because this patch refactors the AST to index pattern arms (which is
necessary to make non-lexical borrows work in the data flow analysis for
common cases), it can break compiler plugins.

r? @nikomatsakis
f? @zwarich

@pcwalton pcwalton force-pushed the seme-regions branch 2 times, most recently from 4786345 to 29a682d Compare September 4, 2014 23:01
SEME is short for "single-entry/multiple-exit".

This patch contains no functional changes, because all intersection and
union operations on SEME regions convert SEME regions to scopes and use
the old scope-based intersection/union logic on those scopes. However,
this patch does take the full generality of SEME regions into account
when computing the gen/kill bits for the data flow analysis used in the
borrow check. Once the correct intersection and union operations land
(possibly using the dominator tree infrastructure), then non-lexical
borrows (issue rust-lang#6393) will begin to work. Therefore, this patch
establishes most of the groundwork for non-lexical borrows.

Because this patch refactors the AST to index pattern arms (which is
necessary to make non-lexical borrows work in the data flow analysis for
common cases), it can break compiler plugins.
@nikomatsakis
Copy link
Contributor

Sorry for the delay @pcwalton. I will look at this first thing tomorrow.

@@ -1972,6 +1972,7 @@ impl<A: Add<A, A> + PartialOrd + Clone + ToPrimitive> Iterator<A> for Range<A> {
// the i64/u64 might lie within their range.
let bound = match self.state.to_i64() {
Some(a) => {
let a = a;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this?

@nikomatsakis
Copy link
Contributor

I think @pcwalton said he intended to close this. I'm going to close it, @pcwalton feel free to re-open if I misunderstood.

lnicola pushed a commit to lnicola/rust that referenced this pull request Apr 7, 2024
internal: Lower outlive goals, respect them in display impls
lnicola pushed a commit to lnicola/rust that referenced this pull request Apr 20, 2024
internal: Lower outlive goals, respect them in display impls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants